<?
	include('chksession.php');
	session_start();
   
	
	  $orderid =$_REQUEST['orderid'];
	   $orderdate= $_REQUEST['orderdate'];
       $refnumber= $_REQUEST['refnumber'];
	   $customername= $_REQUEST['customername'];
	   $contactnumber= $_REQUEST['contactnumber'];
	   $deliverydate= $_REQUEST['deliverydate'];
	   $soldby= $_REQUEST['soldby'];
	   $deliveredby= $_REQUEST['deliveredby'];
	   $glassfrom= $_REQUEST['glassfrom'];
	   $note= $_REQUEST['note'];
	   $remarks = $_REQUEST['remarks'];
	   $grandtotal = $_REQUEST['grandtotal'];
	   $advreceived = $_REQUEST['advreceived'];
	   $enteredby = $_SESSION['username'];
	      
		$sql="insert into ordertranmast(orderdate,refnumber,customername,contactnumber,deliverydate,soldby,deliveredby,glassfrom,note,remarks,grandtotal,advreceived, enteredby,entrydt)
		values('".$orderdate."','".$refnumber."','".strtoupper($customername)."','".$contactnumber."','".$deliverydate."','".$soldby."','".$deliveredby."','".$glassfrom."','".$note."','".$remarks."','".$grandtotal."','".$advreceived."','".$enteredby."',sysdate())";
		
		echo $sql;
		
		$res=mysql_query($sql);
		
		if($res)
		$msg='Record saved successfully';			
		echo $msg;
?>